Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create power buttons widget #112

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

JonAnderBeroz
Copy link

Widget to be able to shutdown , restart or lock the computer

@Pimiovdb
Copy link

how do you style? can you give some documentation?

@Welpyes
Copy link

Welpyes commented Jun 11, 2024

how do you style? can you give some documentation?

you can do this by having a custom widget in the config.yaml


  shutdown:
    type: "yasb.custom.CustomWidget"
    options: 
      label: "\uf011"
      label_alt: "\uf011"
      class_name: "shutdown-button"
      callbacks:
        on_left: "exec cmd /c shutdown /s /t 5"

this shuts down your computer by clicking on it, but i suggest putting the callback as on_right instead of on_left to avoid accidents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants